/**
 * Copyright (c) Daniel Centore
 *
 * ex: set filetype=java expandtab tabstop=4 shiftwidth=4 :
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation.
 */
package ronp.anim.gui.strip;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.BoxLayout;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import ronp.anim.data.filmstrip.Animation;
import ronp.anim.gui.Gui;
import ronp.anim.gui.SelectedState;

/**
 * The entire bottom panel. Includes the strip and tools for the strip.
 * 
 * @author Daniel Centore
 *
 */
public class BottomPanel extends JPanel
{
	private static final long serialVersionUID = 1L;

	/**
	 * Creates a bottom panel
	 * @param anim Instance of {@link Animation}
	 * @param state Instance of {@link SelectedState}
	 * @param gui The instance of {@link Gui}
	 */
	public BottomPanel(final Animation anim, final SelectedState state, Gui gui)
	{
		this.setLayout(new BorderLayout());
		this.add(new JScrollPane(new JAnimationStrip(anim, state, gui)), BorderLayout.CENTER);

		final JMenuBar controller = new JMenuBar();
		controller.setLayout(new BoxLayout(controller, BoxLayout.Y_AXIS));

		this.add(new JScrollPane(controller), BorderLayout.WEST);

		this.setMinimumSize(new Dimension(0, 100));
	}

}
